package com.yaozheng.vocationaltraining.fragment;

import android.widget.TextView;

import com.yaozheng.vocationaltraining.R;
import com.yaozheng.vocationaltraining.bean.CarDetailBean;

import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.EFragment;
import org.androidannotations.annotations.ViewById;

/**
 * Created by moon on 2017/11/21.
 */
@EFragment(R.layout.activity_must_pay)
public class MustPayFragment extends BaseFragment {
    @ViewById
    TextView headTitleText;

    @ViewById
    TextView gouzhishui_textview;
    @ViewById
    TextView shangpaifeiyong_textview;
    @ViewById
    TextView chechuanshiyongshui_textview;
    @ViewById
    TextView jiaoqiangxian_textview;
    @ViewById
    TextView xiaofeishui_textview;

    @ViewById
    TextView xiaofeishui_tip_textview;
    @ViewById
    TextView jiaoqiangxian_tip_textview;
    @ViewById
    TextView chechuanshiyongshui_tip_textview;


    public CarDetailBean getCarDetailBean() {
        return carDetailBean;
    }

    public void setCarDetailBean(CarDetailBean carDetailBean) {
        this.carDetailBean = carDetailBean;
    }

    CarDetailBean carDetailBean;


    @AfterViews
    public void initView() {
        headTitleText.setText("必要花费");

        gouzhishui_textview.setText(PriceFragment.carDetailBean.getGouzhishui()+"");
        shangpaifeiyong_textview.setText(PriceFragment.carDetailBean.getShangpaifei()+"");
        chechuanshiyongshui_textview.setText(PriceFragment.carDetailBean.getChechuanshiyongshui()+"");
        jiaoqiangxian_textview.setText(PriceFragment.carDetailBean.getJiaoqiangxian()+"");
        xiaofeishui_textview.setText(PriceFragment.carDetailBean.getXiaofeishui()+"");


        xiaofeishui_tip_textview.setText(PriceFragment.carDetailBean.getXiaofeishuiName());
        jiaoqiangxian_tip_textview.setText(PriceFragment.carDetailBean.getSeatName());
        chechuanshiyongshui_tip_textview.setText(PriceFragment.carDetailBean.getDisplacementName());
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        this.onDetach();
    }
}
